<?php
namespace Home\Controller;
use Think\Controller;
class PublicController extends Controller {
    public function index(){
        echo "";
    }

    public function valiCode(){
        $Verify = new \Think\Verify();     
        $Verify->length   = 4;
        $Verify->entry();
    }

    public function checkCode(){
        $code=$_POST["param"];
        $verify = new \Think\Verify();
        $verify->reset = false;
        if($verify->check($code)){
            $mess['status']='y';
            $mess['info']='';
        }else{
            $mess['status']='n';
            $mess['info']='验证码错误！';
        }
        $this->ajaxReturn($mess);
    }
}